#ifndef FILES_H_
#define FILES_H_

#include <MI0283QT2/MI0283QT2.h>
#include <EEPROM/EEPROM.h>
#include <stdlib.h>
#include <string.h>

#define START_ADDR 100

class Files
{
	private:
		void insert(char** highscores, uint8_t index, char* score);
		void eepromWriteBytes(int startAddr, const uint8_t* array, int numBytes);
		int readString(int addr, char* buffer, int buffer_size);
		int writeString(int addr, const char* string);
		void writeBytes(int startAddr, const uint8_t* array, int numBytes);
		void clearEeprom();
		void createScoreString(uint16_t score, char* name, char* result);
		void saveHighscores(char** data);
	public:
		Files();
		~Files();
		void SetScore(uint16_t score, char* name);
		void GetHighscores(char** result);
};

#endif /* FILES_H_ */
